import myRequest, * as request from '@/utils/api.js'

export function getModel(params = {}) {
	return request.get('/thirdparty/video/getModel', params);
}

export function postPpt2imgtest(data = {}) { //获取ppt信息
	let formData = new FormData();
	for (const key in data) {
		formData.append(key, data[key]);
	};
	return request.post('/thirdparty/ppt2imgtest/ppt2imgtest', formData);
}
export function postCmp(params = {}) {
	return request.post('/thirdparty/video/cmp', params);
}

export function getResult(params = {}) {
	return request.get('/thirdparty/video/result', params);
}
export function getOSS(params = {}) {
	return request.get('/thirdparty/oss/policy', params);
}
export function postOSS(params = {
	reqType: "",
	matName: "未命名",
	payLoad: {}
}) {
	// return request.post('/thirdparty/oss/policy', params);
	return request.post('/terminal/uploadSingleFile/uploadSingleFile', params);
}

export function postCompound(params = {}) {
	return request.post('/video/audio/compound', params);
}

export function getLingyu(params = {}) {
	return request.get('/quickhome/voicefield/query/all', params);
}

export function getAudioManOfLingyu(fieldId) {
	return request.get(`/quickhome/voicefield/query/voiceuser/${fieldId}`);
}
// export function getAudioManOfPage(params) {//分页获取音频人
//     return request.get(`/quickhome/dub/quer/audio/page`,params);
// }
export function getAudioManOfPage(params) { //分页获取音频人
	return request.get(`/quickhome/dub/quer/audio/page1`, params);
}
export function getStyleOfAudioMan(budid) {
	return request.get(`/quickhome/dub/query/audio/${budid}`);
}

export function postVideoCompound(params) {
	return request.post(`/thirdparty/video/video/compound`, params);
}

export function getSuCai(fieldId) {
	return request.get(`/quickhome/apifoxmodel/query/sys/videomodel`);
}

export function postAudioTTS(params) {
	return request.post(`/thirdparty/audio/tts/upload`, params);
}
export function postAudioTTS2(params) {
	return request.post(`/thirdparty/audio/tts/upload/recognize`, params);
}
export function getCaptionsOfUrl(params) {
	return request.get(`/thirdparty/videototext/test`, params);
}
export function getCaptionsOfUrl2(params) {
	return request.post(`/thirdparty/videototext/test2new`, params);
}
export function getCaptionsOfUrl3(params) {
	return request.post(`/aiwork/subt/v1_s/subt/cent_sub`, params);
}

export function getCacheAdvanceRetreatSelectall(params = {}) { //草稿缓存查询
	// return request.get('/video/query/user/' + userId);
	return request.get('/terminal/cacheAdvanceRetreat/selectall', params);
}

// 用户私有素材操作
export function getUserSource(type) { //用户查询
	return request.get(`/terminal/terminallmatter/query/matter/${type}`);
}
export function deleteUserSource(id) { //用户删除
	return request.post(`/terminal/terminallmatter/delete/matter/${id}`);
}
export function updateUserSource(params) { //用户修改
	return request.post(`/terminal/terminallmatter/update/matter`, params);
}
export function uploadUserSource(params) { //用户上传
	return request.post(`/terminal/terminallmatter/upload/single/matter`, params);
}

export function postAddCache(params) { //用户生成草搞缓存
	return request.post(`/terminal/cacheAdvanceRetreat/addCache`, params);
}
export function postAddCao(params) { //用户生成草搞
	return request.post(`/terminal/tmuUserBindDraft/insert/draft`, params);
}
export function postAddCao_old(params) { //用户生成草搞
	return request.post(`/terminal/tmuUserBindDraft/addMyDraft`, params);
}
export function getDeleteCao(params) { //用户删除草搞
	return request.get(`/terminal/tmuUserBindDraft/deleteMyDraft`, params);
}
export function postSaveCao(params) { //用户保存草搞
	return request.post(`/terminal/cacheAdvanceRetreat/addmodel`, params);
}
export function postUpdateCache(params) { //用户修改草搞缓存
	return request.post(`/terminal/cacheAdvanceRetreat/selectall`, params);
}
export function postUpdateCao(params) { //用户修改草搞
	return request.post(`/terminal/tmuUserBindDraft/updateMyDraft`, params);
}

export function postVideoCompound3(params) { //用户生成视频
	return request.post(`/thirdparty/video/video/compound/three`, params);
}

export function getVirtualcoinrationAll(params = {}) { //获取所有 权益：金币 比例
	return request.get(`/product/virtualcoinration/query/all`, params);
}

export function getAdminSysmatTwoType(type) { //系统素材分类
	// return request.get(`admin/quickhome/query/all/sysmatTwoType/${type}`);
	return request.get(`quickhome/sysmatter/query/all/sysmatTwoType/${type}`);
}
export function getSelectauditlist(params) { //获取app用户数字人
	return request.get('/quickhome/MuseTalk/selectauditlist', params);
}
export function getVideomodel(videoType) { // 用户视频模板
	return request.get(`/quickhome/apifoxmodel/query/sys/videomodel/${videoType}`);
}
export function getVideoSecondType(type) { // 用户根据类型查询视频尺寸
	return request.get(`/quickhome/sysmatter/query/all/sysmatSecondType/${type}`);
}
export function getVideoSysmat(params) { // 用户根据二级类型查询元素
	return request.get(`/quickhome/sysmatter/query/all/sysmatDetailsNew`, params);
}
export function getVideoSysmatAll(params) { //  用户根据二级类型查询全部元素
	return request.get(`/quickhome/sysmatter/query/allMatter/sysmat`, params);
}
export function getVideoParamete(params) { // 用户查询视频尺寸
	return request.get(`/quickhome/commonParamete1/select`, params);
}
export function getSysmat(type) { //系统素材
	return request.get(`/quickhome/sysmatter/query/all/sysmat/${type}`);
}
export function getSysmatTwoType(type) { //系统素材分类
	return request.get(`/quickhome/sysmatter/query/all/sysmatTwoType/${type}`);
}
export function getSysmatById(id) { //系统素材分类ID查找系统素材
	return request.get(`/quickhome/sysmatter/query/all/sysmatDetails/${id}`);
}


export function getAudioByLanguageAndSex(params) { //语言风格或性别随机查找一个配音
	return request.get(`/quickhome/audiolanguage/query/audio/by/language`, params);
}

export function processingVideo(params) { //获取视频帧
	return request.get(`/thirdparty/video/video`, params);
}

export function getAudioLanguage(params) { //获取语言
	return request.get(`/quickhome/audiolanguage/query/audio/languages`);
}
export function getFont() { //字体
	return request.get(`/quickhome/fontfile/query/font/file`);
}

export function getQmsUserHumanModelTwoType(params) { //查询模特分类
	return request.get(`/quickhome/material1/qmsUserHumanModel/humanModelTwoType`, params);
}
export function getQmsUserHumanModelById(params) { //分类id查询模特
	return request.get(`quickhome/material1/qmsUserHumanModel/hmq`, params);
}
export function getQmsUserHumanModelById2(params) { //分类id查询模特old
	return request.get(`quickhome/material1/qmsUserHumanModel/humanModelselectss`, params);
}
export function getQmsUserHumanModelByMyself(params) { //查询私有模特
	return request.get(`quickhome/material1/qmsUserHumanModel/pri_hmq`, params);
}
export function getQmsUserHumanModelByMyself2(params) { //查询私有模特old
	return request.get(`quickhome/material1/qmsUserHumanModel/myself`, params);
}
export function getQmsUserHumanModel() { //查询模特
	return request.get(`/quickhome/material1/qmsUserHumanModel/superclass`);
}
export function getQmsUserHumanModelOne(params) { //查询模特
	return request.get(`/quickhome/material1/qmsUserHumanModel/selectonenew`, params);
}
export function getQmsUserHumanModelSon(params) { //查询模特子分类
	return request.get(`/quickhome/material1/qmsUserHumanModel/son`, params);
}

export function getHomeDetailInfo(params) { //终端个人详情页
	return request.get('/terminal/terminaluser/ter/home/detail', params);
}

export function postImage2Avatar(params) { //合成图片数字人
	return request.post('/thirdparty/video/image/man/cmp', params);
}

export function postMatternew(params) { //合成公共模板
	return request.post('/quickhome/sysmatter/upload/sys/matternew', params);
}
export function getUserVipStatus(params = {}) { // 查看用户vip状态
	return request.get(`/terminal/membe/query/ter/member/detailnew`, params);
}

//-AI台词
export function getMotifQueryMenu(params) { //查询所有菜单
	return request.get('/terminal/motif/query/menu', params);
}
export function getMotif(params) { //查询所有语料
	return request.get('/terminal/hint/bind/query/motif', params);
}
export function getChatCreatScirept(params = {}, opt) { //查询脚本菜单
	return request.get('/aiwork/motif/init_tab', params, opt);
}
export function getChatCreatScireptById(params = {}) { //查询脚本菜单
	return request.get(`aiwork/ms/init/${params.id}`);
}
export function postChatCreatScireptById(params = {}) { //查询所有下级子菜单
	return request.post(`aiwork/motif/son/menu_mp`, params);
}
export function postChatCreatScirept(params) { //创建脚本
	return request.post('/aiwork/chat/script', params);
	// return request.post('/thirdparty/chat/creat/scirept', params);
}
export function postChatTran(params) { //翻译脚本
	return request.post('/aiwork/chat/tran', params);
}

export function getChatTranLang(params) { //查询翻译语言
	return request.get('/terminal/tranlan/query', params);
}


export function chat_stream(params, opt) { //AIChat流式
	return request.post('/aiwork/chat/chat_streamv8', params, opt);
}
export function createAIChat(params, opt) { //创建AIChat
	return request.post('/aiwork/ms/generate', params, opt);
}
export function chat_history(params, opt) { //AIChat历史记录
	return request.get('/aiwork/ms/look/history', params, opt);
}
export function chat_clean_history(params, opt) { //AIChat历史记录
	return request.get('/aiwork/ms/eli/history', params, opt);
}

export function getChatSharerList(params, opt) { //获取用户标识
	return request.get('/terminal/st/qv1', params, opt);
}
export function postChatShare(params, opt) { //分享智能体
	return request.post('aiwork/share/bnd', params, opt);
}
export function getDuration(params, opt) { //获取时间
	return request.get('/thirdparty/ds/gat', params, opt);
}


export function getHotspotTabbarList(params, opt) { //查询热门文案分类
	return request.get(`/aiwork/motif/query/${params.classify_type}`, opt);
}
export function getAiworkRtsNews(params, opt) { //查询热门文案前五条
	return request.get('/aiwork/rts/news', params, opt);
}
export function getAiworkRtsQuery(params, opt) { //查询分类分页数据
	return request.get('/aiwork/rts/query', params, opt);
}
export function postAiworkChatChat_news(params, opt) { //热门文案生成文案
	return request.post('/aiwork/chat/chat_news', params, opt);
}

export function getAiworkobjv1ct(params) { //音、视频识别文字
	return request.get(`/aiwork/obj/v1/ct`, params);
}
export function postGptSovitsv2(params) { //声音克隆
	return request.post(`/quickhome/GptSovitsv2/materialUpload`, params);
}
export function postGptSovitsv2listModel(params) { //声音克隆
	return request.post(`/quickhome/GptSovitsv2/listModel`, params);
}